/**
 * Copyright ToFBA Ecommerce Logistics LTD. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * Shenzhen ToFBA Ecommerce Logistics Co., Ltd.
 * No body can copy or modify any part of this source without the permission of
 * Shenzhen ToFBA Ecommerce Logistics Co., Ltd.
 *   _________    ___   ________  ______        _       
 *  |  _   _  | .'   `.|_   __  ||_   _ \      / \      
 *  |_/ | | \_|/  .-.  \ | |_ \_|  | |_) |    / _ \     
 *      | |    | |   | | |  _|     |  __'.   / ___ \    
 *     _| |_   \  `-'  /_| |_     _| |__) |_/ /   \ \_  
 *    |_____|   `.___.'|_____|   |_______/|____| |____|
 *                                                
 */
package com.lmexpress.orm.rest;

import java.io.Serializable;

/**
 * <服务商API下单对接统一返回>
 * 
 * @author Henry(fba02)
 * @version [版本号, 2020-10-13]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
@SuppressWarnings("serial")
public class ApiOrderResponse implements Serializable {
	/**
	 * 下单成功或者失败标识
	 */
	private Boolean success = Boolean.FALSE;
	/**
	 * 失败重推
	 */
	private Boolean rePush = Boolean.FALSE;
	/**
	 * 是否直接使用服务商面单路径返回,使用服务商路径无需来系统下载面单
	 */
	private Boolean useServiceLabel = Boolean.FALSE;
	/**
	 * 参考号
	 */
	private String referenceNo;
	/**
	 * 追踪号
	 */
	private String trackNumber;
	/**
	 * 错误消息
	 */
	private String msg;
	/**
	 * 服务商系统单号,部分有此返回
	 */
	private String thirdPartyorderNo;
	/**
	 * 服务商面单路径(部分有返回)
	 */
	private String labelUrl;
	/**
	 * 六脉系统面单路径
	 */
	private String lmLabelUrl;
	/**
	 * 原始豹纹
	 */
	private String originalResponse;

	public Boolean getRePush() {
		return rePush;
	}

	public void setRePush(Boolean rePush) {
		this.rePush = rePush;
	}

	public Boolean getSuccess() {
		return success;
	}

	public void setSuccess(Boolean success) {
		this.success = success;
	}

	public String getTrackNumber() {
		return trackNumber;
	}

	public void setTrackNumber(String trackNumber) {
		this.trackNumber = trackNumber;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getThirdPartyorderNo() {
		return thirdPartyorderNo;
	}

	public void setThirdPartyorderNo(String thirdPartyorderNo) {
		this.thirdPartyorderNo = thirdPartyorderNo;
	}

	public String getLabelUrl() {
		return labelUrl;
	}

	public void setLabelUrl(String labelUrl) {
		this.labelUrl = labelUrl;
	}

	public String getLmLabelUrl() {
		return lmLabelUrl;
	}

	public void setLmLabelUrl(String lmLabelUrl) {
		this.lmLabelUrl = lmLabelUrl;
	}

	public String getOriginalResponse() {
		return originalResponse;
	}

	public void setOriginalResponse(String originalResponse) {
		this.originalResponse = originalResponse;
	}

	public ApiOrderResponse() {
		super();
	}

	public ApiOrderResponse(Boolean success, String trackNumber) {
		super();
		this.success = success;
		this.trackNumber = trackNumber;
	}

	public Boolean getUseServiceLabel() {
		return useServiceLabel;
	}

	public void setUseServiceLabel(Boolean useServiceLabel) {
		this.useServiceLabel = useServiceLabel;
	}

	public String getReferenceNo() {
        return referenceNo;
    }

    public void setReferenceNo(String referenceNo) {
        this.referenceNo = referenceNo;
    }

    public ApiOrderResponse ok(Boolean success, String trackNumber) {
		return new ApiOrderResponse(success, trackNumber);
	}

	public ApiOrderResponse ok(Boolean success, String trackNumber, String thirdPartyorderNo, String labelUrl, String lmLabelUrl) {
		ApiOrderResponse apiOrderResponse = new ApiOrderResponse(success, trackNumber);
		apiOrderResponse.setThirdPartyorderNo(thirdPartyorderNo);
		apiOrderResponse.setLabelUrl(labelUrl);
		apiOrderResponse.setLmLabelUrl(lmLabelUrl);
		return apiOrderResponse;
	}

	public ApiOrderResponse(Boolean success, String trackNumber, String originalResponse) {
		super();
		this.success = success;
		this.trackNumber = trackNumber;
		this.originalResponse = originalResponse;
	}

	public ApiOrderResponse(Boolean success, String trackNumber, String msg, String originalResponse) {
		super();
		this.success = success;
		this.trackNumber = trackNumber;
		this.msg = msg;
		this.originalResponse = originalResponse;
	}

	public ApiOrderResponse(Boolean success, String trackNumber, String msg, Boolean rePush, String originalResponse) {
		super();
		this.success = success;
		this.trackNumber = trackNumber;
		this.msg = msg;
		this.rePush = rePush;
		this.originalResponse = originalResponse;
	}

	public ApiOrderResponse(Boolean success, String trackNumber, String msg, Boolean rePush, String thirdPartyorderNo, String labelUrl, String lmLabelUrl, String originalResponse) {
		super();
		this.success = success;
		this.trackNumber = trackNumber;
		this.msg = msg;
		this.rePush = rePush;
		this.thirdPartyorderNo = thirdPartyorderNo;
		this.labelUrl = labelUrl;
		this.lmLabelUrl = lmLabelUrl;
		this.originalResponse = originalResponse;
	}

	@Override
	public String toString() {
		return "ApiOrderResponse [success=" + success + ", trackNumber=" + trackNumber + ", msg=" + msg + ", rePush=" + rePush + ", thirdPartyorderNo=" + thirdPartyorderNo + ", labelUrl=" + labelUrl + ", lmLabelUrl=" + lmLabelUrl + ", originalResponse=" + originalResponse + ", useServiceLabel=" + useServiceLabel + "]";
	}
}